using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Transactions;

using Logger = Garlic.CC.Utility.Logger;
using AppError = Garlic.CC.Utility.AppError;
using Garlic.CC.Utility;
using Garlic.CC.BaseClass;

using Garlic.DM.DataModel;
using Garlic.BLL.Common;
using Garlic.DAL;

namespace Garlic.BLL
{
	/// <summary>
	/// OperationLogBLL 
	/// </summary>
	public partial class OperationLogManager:BaseManager
	{
		
		/// <summary>
		/// get info
		/// </summary>
		/// <param name="operation_log_sn">??</param>
		/// <returns></returns>
		public static OperationLogInfo GetInfo(int operation_log_sn)
		{
			return OperationLogDAL.GetInfo(operation_log_sn);
		}
	
	
		/// <summary>
		/// get list
		/// </summary>
		/// <param name="textWhere"></param>
		/// <param name="orderText"></param>
		/// <returns>OperationLogInfo</returns>
		public static List<OperationLogInfo> GetList(string textWhere,string orderText)
		{
			return OperationLogDAL.GetList(textWhere,orderText);
		}
		
	
		/// <summary>
		/// Add
		/// </summary>
		/// <param name="operationLogInfo"></param>
		public static void Add(OperationLogInfo operationLogInfo)
		{
			try
			{
			    OperationLogDAL.Add(operationLogInfo);
				//OperationLog.WriteLog(UserUtil.GetCurrentUser(),"OperationLog","Add"+operationLogInfo);
			}
			catch(Exception e)
			{
			    Logger.LogError("OperationLogManager", "Add", AppError.EROR, 0, e, null, null);
				throw;
			}
		}
		
		/// <summary>
		/// Update
		/// </summary>
		/// <param name="operationLogInfo"></param>
		public static void Update(OperationLogInfo operationLogInfo)
		{
			try
			{
			    OperationLogDAL.Update(operationLogInfo);
				//OperationLog.WriteLog(UserUtil.GetCurrentUser(),"OperationLog","Update"+operationLogInfo);

			}
			catch(Exception e)
			{
			    Logger.LogError("OperationLogManager", "Update", AppError.EROR, 0, e, null, null);
				throw;
			}
		}
				
		/// <summary>
		/// Delete
		/// </summary>
		/// <param name="int operation_log_sn"></param>
		/// <returns></returns>
		public static void Delete(int operation_log_sn)
		{
			try
			{
			    OperationLogDAL.Delete(operation_log_sn);
				//OperationLog.WriteLog(UserUtil.GetCurrentUser(),"OperationLog","Delete operationLogInfo");
			}
			catch(Exception e)
			{
			    Logger.LogError("OperationLogBLL", "Delete", AppError.EROR, 0, e, null, null);
				throw;
			}
		}
		
	}
}
